home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / ActiveX Controlls / NCTAudioEditor2 ActiveX DLL / NCTAudioEditor2.exe / {app} / Samples / TestVBAudioEditor2 / frmAdvO.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2003-03-28  |  3.8 KB  |  84 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  3. Begin VB.Form frmAdvO 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Advanced Propities"
  6.    ClientHeight    =   870
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   3795
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   870
  14.    ScaleWidth      =   3795
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   1  'CenterOwner
  17.    Begin VB.CheckBox Check1 
  18.       Height          =   315
  19.       Left            =   3195
  20.       TabIndex        =   2
  21.       Top             =   225
  22.       Width           =   1320
  23.    End
  24.    Begin MSComctlLib.Slider Slider1 
  25.       Height          =   495
  26.       Left            =   2835
  27.       TabIndex        =   1
  28.       Top             =   225
  29.       Width           =   2490
  30.       _ExtentX        =   4392
  31.       _ExtentY        =   873
  32.       _Version        =   393216
  33.       Max             =   65535
  34.       TickFrequency   =   6000
  35.    End
  36.    Begin VB.ComboBox cmbAdvanced 
  37.       Height          =   315
  38.       Left            =   90
  39.       Style           =   2  'Dropdown List
  40.       TabIndex        =   0
  41.       Top             =   225
  42.       Width           =   2535
  43.    End
  44. Attribute VB_Name = "frmAdvO"
  45. Attribute VB_GlobalNameSpace = False
  46. Attribute VB_Creatable = False
  47. Attribute VB_PredeclaredId = True
  48. Attribute VB_Exposed = False
  49. Private Sub Check1_Click()  'this sub starts on clicking the Check1 checkbox
  50.     If Check1.Value = 1 Then    'if the checkbox is marked then
  51.         frmDialog.AudioEditor1.DeviceOutput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) = True 'sets the advance value to true
  52.     Else    'otherwise
  53.         frmDialog.AudioEditor1.DeviceOutput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) = False    'sets the advance avlue to false
  54.     End If
  55.     If frmDialog.AudioEditor1.DeviceOutput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) = False Then Check1.Value = 0 Else Check1.Value = 1
  56. End Sub
  57. Private Sub cmbAdvanced_Click() 'this sub starts on clicking
  58.     Dim Val 'declares the variable that stoes the advance value types
  59.     Val = frmDialog.AudioEditor1.DeviceOutput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex)  'get the advamce value type of the current device
  60.     If VarType(Val) = vbBoolean Then    'if the value type is boolean then
  61.         Slider1.Visible = False 'hide the slider
  62.         Check1.Visible = True   'shows the checkbox
  63.         Me.Width = 3740 'sets the form width to 3740
  64.         If Val = False Then Check1.Value = 0 Else Check1.Value = 1  'and mark or clear the checkbox
  65.     ElseIf VarType(Val) = vbLong Then   'if the value type is Long then
  66.         Slider1.Visible = True  'shows the slider
  67.         Check1.Visible = False  'hides the checkbox
  68.         Me.Width = 5520 'sets the form width to 5520
  69.         Slider1.Value = Abs(Val)    'sets the slider value
  70.     End If
  71. End Sub
  72. Private Sub Form_Load() 'this sub starts on loading the form
  73.     Dim i As Integer
  74.     Me.Caption = frmDialog.AudioEditor1.DeviceOutput.DeviceLines.Name & ": Advanced Properties"    'sets the caption to the device name + "Advance Properties"
  75.     For i = 0 To frmDialog.AudioEditor1.DeviceOutput.DeviceLines.AdvancedCount
  76.         cmbAdvanced.AddItem frmDialog.AudioEditor1.DeviceOutput.DeviceLines.AdvancedName(i)     'adds advance option's names to the combo list
  77.     Next i
  78.     cmbAdvanced.ListIndex = 0
  79. End Sub
  80. Private Sub Slider1_Click() 'this sub starts on clicking the slider
  81.     frmDialog.AudioEditor1.DeviceOutput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex) = Slider1.Value    'sets the advance option value according to the slider one
  82.     Slider1.Value = Abs(frmDialog.AudioEditor1.DeviceOutput.DeviceLines.AdvancedValue(cmbAdvanced.ListIndex))
  83. End Sub
  84.